package ja;

import java.io.IOException;
import java.net.URL;
import java.util.Enumeration;

/**
 * User: heihaier@xfuweng.com
 * Date: 2015/7/9
 * Time: 10:49
 */
public class A8 {

    public static void main(String[] args) throws IOException {

        ClassLoader sys = ClassLoader.getSystemClassLoader();
        System.out.println(sys);

        Enumeration<URL> resources = sys.getResources("");
        while (resources.hasMoreElements()) {

            System.out.println(resources.nextElement());
        }

        ClassLoader parentLoader = sys.getParent();
        System.out.println(parentLoader);
        System.out.println(System.getProperty("java.ext.dirs"));
        System.out.println(parentLoader.getParent());
    }
}
